package ib_model.src;
import ib_model.src.*;
//
// This NED provides an InfiniBand Wire Channel model

channel IBWire extends ned.DatarateChannel
{
      double width;                 // the output link width ,4,8,12 lanes
      double speed @unit(Gbps);    // the output speed 2.5, 5.0, 10.0
      //datarate = speed;
      
      datarate = width * speed * 0.8; // Disparity - 8b/10b encoding
      //datarate = width * speed; // Disparity - 8b/10b encoding
}

//
// This NED provides several InfiniBand  Wire Channel model

channel IB4XFDRWire extends IBWire
{
      width = 4;                 // the output link width
      speed = 14.0Gbps;          // the output speed
}

channel IB4XQDRWire extends IBWire
{
      width = 4;                 // the output link width
      speed = 10Gbps;            // the output speed
      delay = 100ns;
}

channel IB4XDDRWire extends IBWire
{
      width = 4;                 // the output link width
      speed = 5.0Gbps;           // the output speed
}

channel IB4XSDRWire extends IBWire
{
      width = 4;                 // the output link width
      speed = 2.5Gbps;           // the output speed
}
